package com.yuyou.train.util.enums.admin;

public class CommDataConfigEnums {
	
	/**
	 * 01：地区，02：科目，03：学员学段，04：导师学段，05：题目标签类型，06：试卷类型，07：个人标签，08勋章类型，09：资源类型
	 *
	 */
	public enum category{		
		area("01","area"),
		subject("02","subject"),
		stage("03","stage"),
		lessonType("04","lessonType"),
		tagType("05","tagType"),
		examType("06","examType"),
		personalTag("07","personalTag"),
		medal("08","medal"),
		resourceType("09","resourceType");		
		category(String value,String categoryCode){
			this.value=value;
			this.categoryCode=categoryCode;
		}		
		private String value;
		private String categoryCode;
		public String getValue() {
			return value;
		}
		public String getCategoryCode() {
			return categoryCode;
		}
		public void setCategoryCode(String categoryCode) {
			this.categoryCode = categoryCode;
		}	
		
		public static String getCodeByValue(String value){		
			for (category e : category.values()) {  
				if(e.getValue().equals(value)){
					return e.getCategoryCode();
				}
			} 			
			return"";
		}
		
	}
	

	

}
